#include "BigInt.hpp"
namespace myh{
    class Fraction{
    private:
        BigInt numerator,denominator;
    public:
        Fraction(const BigInt&,const BigInt&);
        Fraction(const BigInt&);
        Fraction();
        Fraction operator+(const Fraction&) const;
        Fraction operator-(const Fraction&) const;
        Fraction operator*(const Fraction&) const;
        Fraction operator/(const Fraction&) const;
        Fraction operator-() const;
        Fraction operator+() const;
        bool operator==(const Fraction&) const;
        bool operator!=(const Fraction&) const;
        bool operator<(const Fraction&) const;
        bool operator>(const Fraction&) const;
        bool operator<=(const Fraction&) const;
        bool operator>=(const Fraction&) const;
        BigInt getNum() const;
        BigInt getDen() const;
        friend std::ostream& operator<<(std::ostream& os,const Fraction& fraction){
            if(fraction.denominator==1) os<<fraction.numerator;
            else os<<fraction.numerator<<'/'<<fraction.denominator;
            return os;
        }
    };
}